<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../common/jspcommon.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@include file="../common/meta.jsp" %>
<title><c:out value="${tfamily.nickname}" />的封面 - 果果街</title>
<%@include file="../common/jscss.jsp" %>

<script type="text/javascript">
	$(function(){
		$(".tajiatabspan  ul li").click(function(){
			$(this).addClass("current").siblings().removeClass("current"); 
			var type = $(this).attr("coverType");
			$("#cover_type_main").load("coverTypeMain.htm?family=${tfamily.doorplate}&coverType="+type);
		});
		$("#cover_type_main").load("coverTypeMain.htm?family=${tfamily.doorplate}");
		
	});
	
	
	
	function addGZ(){
		
		var follow = "${tfamily.doorplate}";
		$.post("addFollow.htm",{follow:follow},function(data){
			if(data=='success'){
				var agzSus = '<span id="cover_gz_ed"><i class="gzed">已关注</i> | <a id="cover_cancel_gz" href="javascript:cancelGZ();" class="cancel">取消</a></span>';
				$(".gz").append(agzSus);
				$("#cover_add_gz").remove();
			}
		});
		
	}
	function cancelGZ(){
		var follow = '${tfamily.doorplate}';
		$.post("cancelFollow.htm",{follow:follow},function(data){
			if(data=='success'){
				$("#cover_gz_ed").remove();
				var cgzSus = '<span id="cover_add_gz"><a href="javascript:addGZ();" class="addgz">+加关注</a></span>';
				$(".gz").append(cgzSus);
			}
		});
	}
</script>


</head>
<body>
<%@include file="../common/header.jsp" %>
<div class="wraper">
	
	<div class="content">
		<div class="hright htajiasub">
			<div class="hrightspan family">
				<span class="h5"><h5><c:out value="${tfamily.nickname}" /></h5></span>
				<ul>
					<c:forEach items="${tfamily.memberList}" var="tm">
						<c:if test="${tm.role != '05'}">
							<li>
							<a target="_blank"
								<c:if test="${sessionScope.member.family == tfamily.doorplate}">
									href="family?id=${tfamily.doorplate}"
								</c:if>
								<c:if test="${sessionScope.member.family != tfamily.doorplate}">
									href="otherFeed.htm?family=${tfamily.doorplate}"
								</c:if>
									>
								<img width="48" height="48" src="${tm.imageServer}${tm.avatar}" />
								<span style="text-align:center;">
									<c:out value="${tm.nickname}" />
									<c:if test="${tm.approveStatus=='03' }"><img src="imgs/v+.png"  title="达人认证"/></c:if>
								</span>
							</a></li>
						</c:if>
					</c:forEach>
				</ul>
				<c:if test="${sessionScope.member.family != tfamily.doorplate}">
					<p class="gz">
						<c:if test="${sessionScope.member == null}">
							<span id="cover_add_gz"><a href="javascript:GUOGUO.memberLogin();" class="addgz">+加关注</a> </span>
						</c:if>
						<c:if test="${sessionScope.member != null}">
							<c:if test="${isFollow == 0}">
								<span id="cover_add_gz"><a href="javascript:addGZ();" class="addgz">+加关注</a> </span>
							</c:if>
							<c:if test="${isFollow == 1}">
								<span id="cover_gz_ed"><i class="gzed">已关注</i> | <a id="cover_cancel_gz" href="javascript:cancelGZ();" class="cancel">取消</a></span>
							</c:if>
						</c:if>
						
						<span>
						<c:if test="${sessionScope.member != null}">
							<a href="javascript:;" class="sendmessage" onclick="javascript:GUOGUO.sendMessage('${tfamily.doorplate}');">发消息</a>
						</c:if>
						<c:if test="${sessionScope.member == null}">
							<a href="javascript:GUOGUO.memberLogin();" class="sendmessage">发消息</a>
						</c:if>
						</span>
						
						
					</p>
				</c:if>
				
				<div class="clear"></div>
			</div>
			<div class="hrightspan hudong">
				<ul>
					<li>关注<a href="follow.htm?family=${tfamily.doorplate}">${tfamily.followCount}</a></li>
					<li>粉丝<a href="fans.htm?family=${tfamily.doorplate}">${tfamily.fansCount}</a></li>
					<li>被喜欢<a href="javascript:;">${tfamily.loveCount}</a></li>				
				</ul>
		<div class="homeXZShow_y">
			<h4 class="homeXZTitle_y redColor">TA家的勋章</h4>
        	<c:forEach items="${tfamily.myBadge }" var="b" begin="0" end="3">
				<a title="${b.title }" onclick="GUOGUO.showBadge('${b.index}')"><img src="${b.imgUrl }"></a>
			</c:forEach>
			<c:forEach items="${tfamily.myBadge }" var="b" begin="4">
				<c:if test="${b.have==true }">
					<a title="${b.title }" onclick="GUOGUO.showBadge('${b.index}')"><img src="${b.imgUrl }"></a>
				</c:if>
			</c:forEach>
        </div>
         <a href="showMoreBadge.htm?taFamily=${tfamily.doorplate }" class="xzMoreLink fontColorjs" target="_blank">>>查看更多勋章</a>
				<div class="clear"></div>
			</div>
			<div class="hrightspan info">
				<span class="h5"><h5>家的信息</h5></span>
				<p class="p">${tfamily.introduction}</p>
				<p><b>所在地：</b>${tfamily.province} ${tfamily.city}<br /></p>
				<p>
				<c:set var="isBaby" value="0"/>
				<c:forEach items="${tfamily.memberList}" var="b">
				
					<c:if test="${not empty b && b.role=='05' }">
						<c:set var="isBaby"  value="${isBaby+1 }" />
							<c:if test="${isBaby==1 }"><b>宝宝：</b>
								<a href="javascript:void(0)" class="name">${b.username }</a> ${b.age } 
								<c:if test="${b.sex=='F' }">女宝宝</c:if>
								<c:if test="${b.sex=='M' }">男宝宝</c:if>
								<br/>
							</c:if>
							<c:if test="${isBaby!=1 && isBaby!=0}">
								<a href="javascript:void(0)" class="name" style="padding-left: 46px;">${b.username }</a> ${b.age } 
								<c:if test="${b.sex=='F' }">女宝宝</c:if>
								<c:if test="${b.sex=='M' }">男宝宝</c:if>
								<br/>
							</c:if>
					</c:if>
				
				</c:forEach>
				</p>
				<div class="clear"></div>
			</div>
			<div class="hrightspan shareupdate">
				<span class="h5">
					<c:choose>
						<c:when test="${tfamily.doorplate==sessionScope.member.family}">
							<h5>我家的分享动态</h5>
							<a target="_blank" href="family?id=${tfamily.doorplate}" class="alldt">所有动态</a>
						</c:when>
						<c:otherwise>
							<h5>TA家的分享动态</h5>
							<a target="_blank" href="otherFeed.htm?family=${tfamily.doorplate}" class="alldt">所有动态</a>
						</c:otherwise>
					</c:choose>
				</span>
				<c:forEach items="${tCoverFeed.list}" var="doing" varStatus="status">
					<p class="shareup <c:if test="${fn:length(tCoverFeed.list) == status.index+1}">
						lastshareup
					</c:if>">
						<i><a target="_blank" href="dt.htm?id=${doing.identifier}">${doing.lastDate}:</a></i>
						<span>${doing.meContent}</span>
						<c:forEach items="${doing.doingPictureList}" var="pic">
							<img width="80" src="${pic.imageServer}${pic.pictureThumbnail}_100x100.jpg" />
						</c:forEach>
						<c:forEach items="${doing.doingProductList}" var="pro">
							<img width="80" src="${pro.imageServer}${pro.picThumb}_100x100.jpg" />
						</c:forEach>
					</p>
				</c:forEach>
				<div class="clear"></div>
			</div>
			
			<div class="clear"></div>
			<em class="lt"></em><em class="lb"></em><em class="rt"></em><em class="rb"></em>
		</div>
		
		
		
		<div class="htajiamain">
			<div class="tajiaalbum">
					<div class="h5">
						<h5><c:choose><c:when test="${tfamily.doorplate==sessionScope.member.family}">我</c:when><c:otherwise>TA</c:otherwise></c:choose>家的画报</h5>
						<a target="_blank" href="pictorial.htm?family=${tfamily.doorplate}" class="more">所有画报</a>
					</div>
					<div class="h5con">
							<c:forEach items="${picList2.list}" var="pictorial">
								<dl class="albumlist">
									<dt><b><c:out value="${pictorial.title}" /></b><i>${pictorial.picAmount+pictorial.proAmount}图</i></dt>
									<dd>
										<c:forEach items="${pictorial.picList6}" var="pic">
				                  			<a target="_blank" href="picdt.htm?id=${pictorial.identifier}"><img width="100" height="100" src="${pic}_100x100.jpg" /></a>
				                  		</c:forEach>
				                    	<c:if test="${fn:length(pictorial.picList6) < 6}">
				                    		<c:forEach begin="${fn:length(pictorial.picList6)}" end="5">
				                    			<a href="javascript:;" class="hbLinkNone"></a>
				                    		</c:forEach>
				                    	</c:if>
										<span><c:out value="${pictorial.description}" /></span>
									</dd>
								</dl>
							</c:forEach>
							

						</div>
						<div class="clear"></div>
						<em class="lt"></em><em class="lb"></em><em class="rt"></em><em class="rb"></em>
			</div>
		
		
			<div class="tajiatiezi" id="tajiatiezi">
			<%@include file="coverForumDoingList.jsp" %>
			</div>
			<div class="tajiatabspan">
					<ul class="tab">
						<li class="current" coverType="all">全部</li>
						<li coverType="product">宝贝</li>
						<li coverType="picture">相册</li>
					</ul>
			</div>
			
			<div id="cover_type_main">
			</div>
					
						
					
					
			<div class="clear"></div>
		
		</div>
	</div>
	<div class="clear"></div>
	<!--/content-->
	<%@include file="../common/footer.jsp" %>
    <!--/footer-->
</div><!--/wraper-->
</body>
</html>
